<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>短信提醒</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div class="searchArea">
			<form id="searchBar">
				<div class="fieldset1 tabel_col tabel_col_1 clearFix">
					<div class="fieldBox col_100_auto">
						<div class="label">选择短信接收人</div>
						<div class="field">
							<c:forEach items="${expBizManRecList}" var="exp" varStatus="state">
								<table>
									<tr>
										<td class=""><input type="checkbox" id="expId" name="expId" value="${exp.id}"></td>
										<td class="">${exp.rlNm}</td>
										<td class="">${exp.mp}<br></td>
									</tr>
								</table>
							</c:forEach>
						</div>
					</div>
				</div>
				<div class="btnsBox">
					<span id="send" class="sq-button sq-button-round" onclick="sendSMS();">发送短信</span>
				</div>
			</form>
		</div>
	</div>
<script type="text/javascript">
	var lsCntNo = '${lsCntNo}';
	$(function () {
		var ligerForm = liger.get("searchBar");
	});
	function sendSMS() {
		var array = new Array();
		$.each($('input:checkbox[name=expId]'),function(){
			if(this.checked){
				array.push($(this).val());
			}
		});
		var docArray = JSON.stringify(array);
		$.ajax({
			type: 'post',
			dataType:'json',
			data: {"expIds":docArray,"lsCntNo":lsCntNo},
			url: '<%=path%>/expatriate/expBizManRec/sendSMS.do',
			beforeSend: function(){
				wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
			},
			success:function(msg){
				wait_dialog.close();
				if(msg.success == 1){
					$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
					grid.reload();
				}else{
					$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
				}
			}
		});
	}
</script>
</body>
</html>